// 在html中添加如下代码，即可查看htmlWebpackPlugin对象，主要作用：
// 1、读取配置的title
// 2、添加自定义配置项cdn，可在html中动态引入cdn地址

// <!-- <title><%= JSON.stringify(htmlWebpackPlugin) %></title> -->

const htmlWebpackPlugin = {
    tags: {
        headTags: [
            {
                tagName: 'link',
                voidTag: true,
                meta: { plugin: 'html-webpack-plugin' },
                attributes: { rel: 'icon', href: '/favicon.ico' },
            },
            {
                tagName: 'script',
                voidTag: false,
                meta: { plugin: 'html-webpack-plugin' },
                attributes: {
                    defer: true,
                    src: '/js/chunk-vendors.068be9a2.js',
                },
            },
            {
                tagName: 'script',
                voidTag: false,
                meta: { plugin: 'html-webpack-plugin' },
                attributes: { defer: true, src: '/js/vueApp.85f5da00.js' },
            },
            {
                tagName: 'link',
                voidTag: true,
                meta: { plugin: 'html-webpack-plugin' },
                attributes: {
                    href: '/css/vueApp.646c875c.css',
                    rel: 'stylesheet',
                },
            },
        ],
        bodyTags: [],
    },
    files: {
        publicPath: '/',
        js: ['/js/chunk-vendors.068be9a2.js', '/js/vueApp.85f5da00.js'],
        css: ['/css/vueApp.646c875c.css'],
        favicon: '/favicon.ico',
    },
    options: {
        template:
            '/Users/xyh/Documents/webpack5-cli/node_modules/html-webpack-plugin/lib/loader.js!/Users/xyh/Documents/webpack5-cli/public/index.html',
        templateContent: false,
        filename: 'index.html',
        publicPath: 'auto',
        hash: false,
        inject: 'head',
        scriptLoading: 'defer',
        compile: true,
        favicon: '/Users/xyh/Documents/webpack5-cli/public/favicon.ico',
        minify: 'auto',
        cache: true,
        showErrors: true,
        chunks: 'all',
        excludeChunks: [],
        chunksSortMode: 'auto',
        meta: {},
        base: false,
        title: 'webpack5脚手架',
        xhtml: false,
    },
};
